package tencent

import (
	"fmt"

	"github.com/spf13/viper"
)

func New(slugs ...string) *Tencent {
	slug := "default"
	if len(slugs) > 0 {
		slug = slugs[0]
	}
	config := viper.GetStringMapString(fmt.Sprintf("org.tencent.auth.%s", slug))

	return &Tencent{
		secretId:  config["secretId"],
		secretKey: config["secretKey"],
		region:    config["region"],
	}
}

type Tencent struct {
	secretId  string
	secretKey string
	region    string
}
